package com.powerrich.controller;

import com.powerrich.pojo.VipPO;
import com.powerrich.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 黄雨
 * @title: HelloController
 * @projectName demo
 * @description: TODO
 * @date 2019-04-0815:09
 */
@Controller
public class HelloController {

    @Autowired
    private VipService vipService;


    @RequestMapping("index")
    public String hello(){
        return "index";
    }

    @GetMapping("getAllVip")
    @ResponseBody
    public List<VipPO> getAllVip(){
        return vipService.getAllVip();
    }
}
